package com.eighth.decorator;

/**
 * Author Name: Justice
 * Project Name: Stage11
 * File Name: TestDemo
 * Package Name: com.eighth.decorator
 * Date: 2020-03-27 13:27
 * Copyright (c) 2020,All Rights Reserved.
 * 动态地将责任附加到对象上。想要扩展功能，装饰者提供有别于继承的另一种选择
 */


public class TestDemo {
    public static void main(String[] args) {
        ABattercake aBattercake;
        aBattercake = new Battercake();
        aBattercake = new EggDecorator(aBattercake);
        aBattercake = new SausageDecorator(aBattercake);
        System.out.println(aBattercake.getDesc() + ":" + aBattercake.cost());
    }
}
